<template>
  <div class="index">
    <header class="header">
      <a href="javascript:window.history.back()">
        <!-- <i class="return-back"></i> -->
        <i class="iconfont icon-fanhui return-back2"></i>
      </a>
      <p class="head-tit">资讯</p>
    </header>
    <div class="container has-heade">
      <iframe id='web' class="web" :src=url ref="content"></iframe>
      <!-- <div class="has-nav"></div> -->
    </div>
    
  </div>
</template>
<script>
import { Swipe, SwipeItem } from "mint-ui";
import "./style/iconfont/iconfont.css";
import { aopnews} from '@/request/zxapi'
export default {
  name: "newsDetail",
  components: {
    mtSwipe: Swipe,
    mtSwipeItem: SwipeItem
  },
  data: function() {
    return {
      data:String,
      url:String,
      changeValue:null
    };
  },
  created() {
    this.url =this.keyUrl2 + this.$route.params.url;
    this.$nextTick(() => {
        //DOM现在更新了
        this.reSetSize();
     });
  },
  methods:{
    reSetSize(){
      var windowsHeight = window.innerHeight;
      this.$refs.content.height= (windowsHeight-44) + "px";
      this.$refs.content.width=window.innerWidth+'px'
    },
    
  }
};
</script>
<style lang="less" scoped>
iframe{
  border:none;
}
.header {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
  width: 100%;
  height: 44px;
  line-height: 44px;
  background: #e23a3a;
}

.header:before {
  position: absolute;
  z-index: 2;
  content: "";
  width: 100%;
  height: 1px;
  bottom: 0;
  left: 0;
  border-bottom: 1px solid #d8d8d8;
  -webkit-transform: scaleY(0.5);
  transform: scaleY(0.5);
}

.header .head-tit {
  width: 50%;
  font-size: 18px;
  text-align: center;
  color: #ffffff;
  margin: 0 auto;
  overflow: hidden;
  white-space: nowrap;
  word-break: keep-all;
  -ms-text-overflow: ellipsis;
  text-overflow: ellipsis;
}

.header .return-back2 {
  position: absolute;
  top: 50%;
  // margin-top: -12px;
  left: 15px;
  // width: 24px;
  // height: 24px;
  // line-height: 0;
  vertical-align: middle;
  display: inline-block;
  font-size: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  // background: url()
  //   50%;
  // background-size: contain;
}
.container {
  box-sizing: border-box;
  background: #fff;
}

.container {
  padding-top: 44px;
}
</style>
